<{Tinclude "commom/admin_header"}>
 <section id="container" >
      
      <!--顶部-->
      <{Tinclude"commom/admin_inner_header"}>
      <!--顶部-->
      
       <{Tinclude"commom/admin_left_menu"}>
       
       <section id="main-content">
          <section class="wrapper">
          	<h3><i class="<{if $___menuinfo["iconclass"]}><{$___menuinfo["iconclass"]}><{else}>fa fa-list-ul<{/if}>"></i><{$___menuinfo["base_name"]}></h3>
                <div class="row mt">
                    <div class="col-md-12">
                       <div class="form-panel">
                           
                           <form class="form" role="form" action="<{echo Common::RewriteUrl($jp_arg["c"],$jp_arg["a"]);}>"  method="post" enctype="multipart/form-data">  
                                <input type="hidden" name="id" value="<?php echo $id;?>"/>
                               <div class="form-group input-group col-md-3">
   
                <span class="input-group-addon" id="basic-addon1">楼房编号:</span>
                <input type="text" name="base_name" class="form-control" placeholder="1栋01" value="<{$data["base_name"]}>" aria-describedby="basic-addon1">

           </div>
                               <div class="form-group input-group col-md-12 col-xs-12 minheight">
               <label for="exampleInputFile">上传图片</label>
               <input type="file" id="exampleInputFile" name="image" />
           </div>
                                 <div class="form-group form-inline menuparent">
 <select class="form-control province_id" name="province_id">
<option value="0">请选择省份</option>
<{foreach $provlist as $v}>
<option value="<{$v["id"]}>" <{if $v["id"]==$data["province_id"]}>selected<{/if}>><{$v["province"]}></option>
<{/foreach}>
  </select>
                                     <span id="citylist">
                                         <{if isset($citylist)}>
<select class="form-control city_id" name="city_id">
<option value="0">请选择城市</option>
<{foreach $citylist as $v}>
<option value="<{$v["id"]}>" <{if $v["id"]==$data["city_id"]}>selected<{/if}>><{$v["city"]}></option>
<{/foreach}>
  </select>
<{/if}>
                                     </span>
                                     <span id="arealist">
                                         <{if isset($arealist)}>
<select class="form-control area_id" name="area_id">
<option value="0">请选择(区/县)</option>
<{foreach $arealist as $v}>
<option value="<{$v["id"]}>" <{if $v["id"]==$data["district_id"]}>selected<{/if}>><{$v["area"]}></option>
<{/foreach}>
  </select>
<{/if}>
                                     </span>                

     
     
 </div>                  
                                
                                 <div class="form-group input-group col-md-3">
   
                <span class="input-group-addon" id="basic-addon2">层数:</span>
                <input type="text" name="layer_num" value='<{$data["layer_num"]}>' class="form-control" placeholder="0" aria-describedby="basic-addon2">

           </div>
                               
                                 <div class="form-group input-group col-md-3">
   
                <span class="input-group-addon" id="basic-addon1">房间数:</span>
                <input type="text" name="room_count" value='<{$data["room_count"]}>' class="form-control" placeholder="0" aria-describedby="basic-addon1">

           </div>
                                   <div class="form-group input-group col-md-3">
   
                <span class="input-group-addon" id="basic-addon1">厕所数:</span>
                <input type="text" name="wash_room" value='<{$data["wash_room"]}>' class="form-control" placeholder="0" aria-describedby="basic-addon1">

           </div>
                               
                               
                                <div class="form-group input-group col-md-12 col-xs-12 minheight">
          <textarea class="form-control" name="desc"  placeholder="简单描述" rows="3"><{$data["desc"]}></textarea>
          </div>   
                 
            <input class="btn btn-primary btn-block" type="submit" name="submit" value="提交">
                   
                               
                           </form>
                           
                           
                           
                       </div>
                    </div>
                        
                </div>
          </section>
       </section>
 </section>
<script>
    $(document).ready(function(){
                $("select[name='city_id']").change(function(){
                var city_id=$(this).val();
                $.post("<{echo Common::RewriteUrl("Building","public_ajax_getarealist");}>",{"city_id":city_id},function(html){
                    $("#arealist").html(html);
                });
            });
    });
    $("select[name='province_id']").change(function(){
        var proid=$(this).val();
        $.post("<{echo Common::RewriteUrl("Building","public_ajax_getcitylist");}>",{"proid":proid},function(html){
            $("#citylist").html(html);
            $("#arealist").html("");
            $("select[name='city_id']").change(function(){
                var city_id=$(this).val();
                $.post("<{echo Common::RewriteUrl("Building","public_ajax_getarealist");}>",{"city_id":city_id},function(html){
                    $("#arealist").html(html);
                });
            });
        });
    });
</script>
<{Tinclude"commom/admin_footer"}>